package com.mttk.orche.util.dyna;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import javax.tools.SimpleJavaFileObject;

public class MySourceJavaObject extends SimpleJavaFileObject {
    private String content = null;
    public MySourceJavaObject(String name, String content) throws URISyntaxException {
       super(URI.create("string:///" + name.replace('.','/') + Kind.SOURCE.extension), Kind.SOURCE);
       this.content = content;
    }

    public CharSequence getCharContent(boolean ignoreEncodingErrors)  throws IOException {
       return content;
    }
 }
